package com.datatest.riskcheck.service.serviceImpl;

import com.datatest.beans.po.ConditionEntity;
import com.datatest.beans.po.RuleEntity;
import com.datatest.riskcheck.dao.tongdun.RuleConditionMapper;
import com.datatest.riskcheck.service.api.RuleConditionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class RuleConditionServiceImpl implements RuleConditionService {

    @Autowired
    private RuleConditionMapper ruleConditionMapper;

    @Override
    public List<ConditionEntity> selectAllRules(List<RuleEntity> fkUuids) {
        List uuidList = new ArrayList();
        for(RuleEntity ruleEntity:fkUuids){
            uuidList.add(ruleEntity.getRule_uuid());
        }
        List<ConditionEntity> list = ruleConditionMapper.selectAllRulesByUuid(uuidList);
        return list;
    }
}
